<?php
session_start();
date_default_timezone_set('Asia/Singapore');
echo "<!DOCTYPE html>";
echo "<html>";
echo "<head>";
	echo "<title>Travel Cabin</title>";
	echo "<link rel='stylesheet' href='css/main.css'>";
	echo "<link rel='stylesheet' href='css/lightbox.css'>";
	echo "<link rel='stylesheet' href='css/admin.css'>";
	echo "<script src='//ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js'></script>";
	//echo "<script src='resources/js/jquery.js'></script>";
	echo "<script type='text/javascript' src='resources/js/login.js'></script>";
	echo "<script type='text/javascript' src='resources/js/lightbox.js'></script>";
	echo "<script type='text/javascript' src='resources/js/comments.js'></script>";
	echo "<script type='text/javascript' src='resources/js/error.js'></script>";
	//plugins
	echo "<script src='http://malsup.github.com/jquery.form.js'></script>";
	if(basename($_SERVER['PHP_SELF']) != 'index.php') {
		?>
		<script type="text/javascript" src="resources/js/jq.js"></script>
		<script type="text/javascript" src="resources/js/googleMapFunctions.js"></script>
		<script type="text/javascript"src="https://maps.googleapis.com/maps/api/js?key=AIzaSyCVTwXKjkrEZzayYUSq6p0Zsp254TM4Rng&sensor=true"></script>
		<?php
	}
echo "</head>";
echo "<body>";
echo "<div id='overlay'></div>";
echo "<div id='upload-profile-picture-form'>";
	echo "<div id='profile-picture-form-title'>Upload Profile Picture</div>";
	echo "<form id='upload-photo-form' action='upload.php' method='post' enctype='multipart/form-data'>";
		echo "<input type='file' size='60' name='uploaded_file'>";
		echo "<input type='submit' id='upload-photo-button' value='Upload'>";
	echo "</form>";
	echo "<div id='message'></div>";
echo "</div>";
echo "<div id='upload-place-picture-form'>";
	echo "<div id='place-picture-form-title'>Upload Place Picture</div>";
	echo "<form id='upload-place-photo-form' action='upload_place_photo.php' method='post' enctype='multipart/form-data'>";
		echo "<input type='file' size='60' name='uploaded_file'>";
		echo "<input type='hidden' name='place_id' id='place_id_for_photo' value=''>";
		echo "<input type='submit' id='upload-photo-button' value='Upload'>";
	echo "</form>";
echo "</div>";
echo "<div id='register-user-form'>";
	echo "<div id='register-user-form-title'>Register</div>";
	echo "<form onsubmit='register_user();return false;'>";
		echo "<label>Username</label>";
		echo "<input type='text' name='username' id='username' /><span id='username-error-message'></span><br>";
		echo "<label>Password</label>";
		echo "<input type='password' name='password' id='password' /><span id='password1-error-message'></span><br>";
		echo "<label>Retype Password</label>";
		echo "<input type='password' name='password2' id='password2' /><span id='password2-error-message'></span><br>";
		echo "<label></label>";
		echo "<input type='submit' value='Register'>";
	echo "</form>";
	echo "<div id='message'></div>";
echo "</div>";
echo "<div id='lightbox'>";
	echo "<!--whatever goes in here-->";
		echo "<div id='login-bar' class='main-layout-style' class='main-padding-style'>";
			echo "<form onsubmit='check_login();return false;'>";
			echo "<label>Username</label>";
			echo "<input type='text' name='username' id='login-username' />";
			echo "<label>Password</label>";
			echo "<input type='password' name='password' id='login-password' />";
			echo "<label class='error' id='error' style='display: none; font-size: 12px;'></label>";
			echo "<input type='submit' class='submit' value='Log In'>";
			echo "<div class='tiny-nl-info'>Not a member? <span id='register-link'>Register here</span></div>";
			echo "</form>";
		echo "</div>";
	echo "</div>";
	echo "<div id='clear'></div>";
	echo "<div id='login-div' class='main-layout-style'>";
		echo "<!--facebook connect-->";
		include('resources/status-bar.php');
	echo "</div>";
?>